<?php
	//使用GD库画图
	//需要一个画布
	//$huabu = imagecreate(400,400);
	//创建一个真色彩画布
	$huabu = imagecreatetruecolor(400,400);
	//定义一个颜色
	$red = imagecolorallocate($huabu,255,0,0);
	$white = imagecolorallocate($huabu,255,255,255);
	//画布也需要颜色
	//填充画布
	imagefill($huabu,1,1,$white);
	
	//画一个线
	imageline($huabu,20,250,300,250,$red);
	imageline($huabu,290,240,300,250,$red);
	imageline($huabu,290,260,300,250,$red);
	imageline($huabu,80,20,80,300,$red);
	imageline($huabu,80,20,70,30,$red);
	imageline($huabu,80,20,90,30,$red);
	for($i = 80; $i<= 300; $i += 30){
	imageline($huabu,80,$i,90,$i,$red);
	}for($i = 250; $i>= 40; $i -= 30){
	imageline($huabu,$i,250,$i,240,$red);
	}
	
	header("content-type:image/png");
	imagepng($huabu);
	imagedestroy($huabu);